Ventilator patient synchronization

ABSTRACT

A method and apparatus that provides an expert system for determining respiratory phase during ventilatory support of a subject. Discrete phase states are partitioned and prior probability functions and observed probability functions for each state are defined. The probability functions are based upon relative duration of each state as well as the flow characteristics of each state. These functions are combined to determine phase probabilities for each state using Bayes&#39; theorem. The calculated probabilities for the states may then be compared to determine which state the subject is experiencing. A ventilator may then conform respiratory support in accordance with the most probable phase. To provide a learning feature, the probability functions may be adjusted during use to provide a more subject specific response that accounts for changing respiratory characteristics.

This application is a continuation of U.S. patent application Ser. No.11/287,746 filed Nov. 28, 2005, now U.S. Pat. No. 7,727,160, which is acontinuation of U.S. patent application Ser. No. 11/064,592 filed Feb.24, 2005, now U.S. Pat. No. 6,997,881, which is a continuation of U.S.application Ser. No. 10/153,343 filed May 22, 2002, now U.S. Pat. No.6,860,858, which claims the priority date of U.S. Provisional PatentApplication Ser. No. 60/292,983 filed on May 23, 2001 all of which arehereby incorporated herein by reference in their entirety.

FIELD OF THE INVENTION

This invention relates to methods for synchronizing ventilators withpatient respiration. More specifically it relates to methods forestimating the phase in patient respiration using patient flowmeasurements so that the respiratory support of a ventilator can matchthe phase of the respiratory cycle of the patient.

BACKGROUND OF THE INVENTION

Mechanical ventilators assisting spontaneously breathing patients striveto synchronize their performance with the patient's efforts. To do this,ventilators typically measure one or more of pressure, volume, flow andtime and compare that measure with predetermined thresholds. Someventilators use respiratory bands around the chest and abdomen of thepatient to detect patient effort. The ventilator may then adjust thepressure, volume or flow of air being delivered to the patient inaccordance with measure of the patient's efforts. For example, aflow-triggered pressure controlled device may deliver air at one fixedpressure to a patient until the flow crosses a threshold level,whereupon the pressure is changed to another fixed pressure. Dependingon their conditions, different patients may experience different levelsof discomfort depending upon how quickly and accurately the ventilatortracks the patients' efforts. Simple threshold tests may fail whenbreaths are irregular, for example, during the presence of coughs, sighsand snores. An improved method and apparatus for ventilator patientsynchronization is described in Patent Cooperation Treaty ApplicationPCT/AU97/00631 with publication number WO 98/12965 (Berthon-Jones) wherethe phase of the patient's respiratory cycle is determined from flowdata using fuzzy logic. The specification is hereby included bycross-reference.

Typical apparatus includes a servo 3 controlled blower, comprised of amotor 2 and an impeller 1 connected to a patient interface 5 via an airdelivery conduit 6, as shown in FIG. 1. The controller 4 is typically acomputer, a processor including memory, or a programmable circuit. Oneexample of patient interface is a nasal mask, others include nose andmouth masks, full face masks and nasal pillows. The pressure in the maskmay be measured by a transducer 11 having direct contact with the mask,or alternatively, the transducer may be physically situated in theblower main housing and may estimate the mask pressure usingcorrelations. Flow transducers 10 or other means for measuring flow mayalso be situated in the mask or in the blower main housing. There arevarious displays 8 and switches 7 on the blower housing. There is aninterface 15 to enable the apparatus to communicate with other devices.Some apparatus include a fixed speed blower whose output is controllablyvariably vented to atmosphere providing a controlled variable pressureto the patient.

“Expert” systems are known to be used for assisting with medicaldiagnosis. Such expert systems are typically said to comprise two parts,a “knowledge base” and an “inferencing engine.” The knowledge basecomprises the set of “expert” information about the system which is usedto guide interpretation of the data which has been observed.Sophisticated expert systems may include hundreds, or thousands ofpieces of information in the knowledge base. The fuzzy membership rulesand weights of Berthon-Jones may be interpreted as the knowledge base.The inferencing engine is the mechanism which combines the knowledgebase with the experimental evidence to reach the conclusion. Severaldifferent inferencing engines are known, such as those based on fuzzylogic, rule based reasoning and Bayesian likelihoods.

Bayes' theorem¹ quantifies the intuitively appealing proposition thatprior knowledge should influence interpretation of experimentalobservations. One form of Bayes' theorem is:

$\begin{matrix}{{L\left( H_{i} \middle| F_{j} \right)} = \frac{{L\left( H_{i} \right)}{L\left( F_{j} \middle| H_{i} \right)}}{\sum\limits_{n}\;{{L\left( H_{n} \right)}{L\left( F_{j} \middle| H_{n} \right)}}}} & (1)\end{matrix}$where L is a likelihood or probability function. Thus, L(H|F) is thelikelihood of an hypothesis being true, given observation F, L(H) is thelikelihood of the hypothesis being true, and L(F|H) is the likelihood ofthe observation given the hypothesis being true. ¹ Armitage & Berry(1994) Statistical Methods in Medical Research, 3rd Edition, p 72,Blackwell Science Ltd, Oxford, United Kingdom ISBN 0-632-03695-8

For example, if a physician has observed a particular symptom in apatient, in deciding whether the patient has a particular disease, thephysician draws upon the prior evidence of the likelihood that thepatient has the particular disease. Several independent observations maybe used in conjunction with prior likelihoods to determine thelikelihood that an hypothesis is true. The decision may be taken to bethe most likely hypothesis.

BRIEF DESCRIPTION OF THE INVENTION

The invention is a method and apparatus for determining phase withprobability functions. The method involves partitioning the respiratorycycle into discrete phase states. The states will include inspirationand expiration and preferably include a number of additional stateswithin inspiration and expiration. The probabilities of each phase stateare then calculated using probability functions. In the preferredembodiment, the calculation is a function of an “observed probability”determination L(F_(j)|H_(i)) and a “prior probability” determinationL(H_(i)). The calculated probabilities L(H_(i)|F_(j)) are then comparedto determine the actual phase in the patient's respiratory cycle thatthe patient is experiencing.

Prior probabilities of each particular state may be determined by afunction of relative duration, that is, the ratio of each state'sduration to the duration of an, entire respiratory cycle. The inventioncontemplates discrete phase states that may be equivalent in duration orof unequal durations. Such states of different duration may be derivedby partitioning the respiratory cycle into sections in relation to apeak flow or differing rates of change of flow. Moreover, calculatedprobabilities my be adjusted based upon state succession, e.g.,increasing the likelihood of the state that follows consecutively fromthe currently determined state.

The observed probability determination evaluates the likelihood of eachstate given an observed respiratory characteristic. In the preferredembodiment of the invention, respiratory flow is observed or measuredfrom the patient. In the evaluation, the measure is applied to aprobability function that is based upon the predetermined likelihoodsbetween that measure and each potential phase state, for example, thelikelihood that a particular range of flow would be associated with aparticular state.

The method may also be used to dynamically improve reliability of phasedetection by learning the respiratory patterns or characteristics of thepatient. By utilizing previously calculated state probabilities toadjust prior probabilities, subsequently calculated state probabilitiesprovide greater patient specific accuracy in phase determination.Moreover, previously recorded breath data can be used to modify thepartitioning of phase states or revise the relationship between observedrespiratory characteristics and the likelihoods for each state given theobservation.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 depicts a prior art ventilator apparatus suitable for use withthe invention;

FIG. 2 is a flow chart of steps in a method in accordance with theinvention;

FIG. 3 illustrates phase classification based on equivalent stateduration;

FIG. 4 illustrates phase classification based upon peak flow;

FIG. 5 shows phase classification with a set of observations useful fordetermining probabilities of the identified states;

FIG. 6 shows flow versus time data for a person over a period of 1minute;

FIG. 7 shows flow versus time data for a person over a period of 10seconds.

DETAILED DESCRIPTION OF THE INVENTION

The invention provides a method and apparatus for improved ventilatorpatient synchronization in which the most likely phase is determined onthe basis of flow and rate of change of flow information using Bayes'theorem or some similar formula for assessing conditional probability.In an identifying step 20 as shown in FIG. 2, according to theinvention, the respiratory cycle is divided or partitioned into a numberof distinct states, for example, early inspiration, mid-inspiration,late inspiration, early expiration, mid-expiration, late expiration,pause, sigh and cough. When the method and apparatus according to theinvention are being used, flow and pressure observations are madecontinuously and at each time point in a measuring step 22. In acalculating step 24, probabilities or likelihoods are determined. Thelikelihood of the phase corresponding to each of the states isdetermined preferably using Bayes' theorem as shown in equation 1,supra. For example, in a system that distinguishes between six states,six calculations for each distinct state using equation 1 would be made.This evaluation may include an assessment of the prior likelihood ofeach of the identified states L(H_(i)). However, these may be determinedbefore use and/or adjusted during use. Likelihoods of the distinctrespiratory states occurring given flow and rate of change of flowobservations L(H_(i)|F_(j)) are also determined. After theseevaluations, in a determining step 26, the patient's phase is determinedto be the phase which corresponds to the most likely state, e.g. thephase calculation with the highest probability or likelihood. Thisinformation may then be used by the apparatus to adjust the flow, volumeor pressure of air being delivered to the patient in order to improveventilator synchronization.

The prior likelihood or prior probability of each state L(H_(i)) dependsupon the definition of the state and its relative duration. Such adetermination may be accomplished by a ratio of the duration of thestate to the duration of a respiratory cycle. Each state may notnecessarily have the same duration. A simple system might divide therespiratory cycle into two states: Inspiration and Expiration.Alternatively, a greater number of states within inspiration orexpiration may be classified by the system. If the respiratory cycle ledto sinusoidal flow vs. time curves, then it may be appropriate to dividethe cycle into equal temporal subsections and assign each subsection asa state in which case, each state may be equally likely a priori. Forexample, if the duration of a hypothetical respiratory cycle was 6seconds and the system distinguishes six states, then each state may beone second in duration, the first second being termed “earlyinspiration”, the next second “mid-inspiration” and so on. In thismodel, the different states may have the same prior likelihoods. Thus,as illustrated in FIG. 3 the likelihood of each state L(H_(i)) is ⅙ asfollows:

-   -   L(H_(early) _(—) _(inspiration))=⅙    -   L(H_(mid) _(—) _(inspiration))=⅙    -   L(H_(late) _(—) _(inspiration))=⅙    -   L(H_(early) _(—) _(expiration))=⅙    -   L(H_(mid) _(—) _(expiration))=⅙    -   L(H_(late) _(—) _(expiration))=⅙

Increasing the number of states increases the potential accuracy of asystem to track changes in respiratory state, however, this comes at anincreasing computational cost. It may be computationally more efficientto have states of different duration. In one model of respiration, thestates may be chosen on the basis of magnitude of flows, for exampleearly flows from 0 up to ⅙th of the peak flow may be termed “earlyinspiration”. In such a system, for example, as shown in FIG. 4, againbased upon a respiration cycle for a typical patient flow. L(H_(early)_(—) _(inspiration)) might be 4/48 where 4 approximates the duration ofthe state and 48 approximates the duration of the entire cycle, viewedas the intercept of the peak flow range and the flow cycle. Similarly, amid inspirational state determined from 5/6 to 6/6 of the peak flowmight have a likelihood L(H_(mid) _(—) _(inspiration)) equal to 11/48.FIG. 4 also shows a mid expiration state with L(H_(mid) _(—)_(expiration)) equal to 9/48. The remaining states may be determined insimilar fashion.

In another model of respiration, the rate of change of flow may bechosen as the basis for dividing the respiratory cycle. Thus, an earlyinspiration state may be characterized by flow where the rate of changeis in a range appropriate to classify the rate of change of respirationin its early stages. Using for example a graph, the duration of adiscrete portion of the respiratory cycle in that particular rate ofchange range divided by the duration of the entire cycle can then yieldthe prior probability of the particular state L(H_(i)). An advantage ofdividing the respiratory cycle on the basis of rate of change of flow isthat those parts of the respiratory cycle where flow changes morerapidly may have more respiratory states assigned to them. In theselatter two models, the different states may have different priorlikelihoods.

In one form of the invention, the number of states and their definitionsmay be adaptively refined depending upon the breath data. For example,where the flow rate is changing rapidly, the apparatus according to theinvention can determine that it is appropriate to have more states todefine that region.

Observation of breath data of patients over several nights leads to theconclusion that a cough is a priori less likely to occur than a breath,since patients breath more often than they cough. It may also beobserved that a deep breath is more likely following a number of shallowbreaths. Patients are known to pass through a number of different stagesduring sleep, such as REM sleep. The nature of their breathing canchange depending on the different stage of sleep and hence differenttypes of breath are a priori more likely depending on the stage ofsleep. To the extent to which a particular patient exhibitscharacteristic breaths, the system has the capability to learn thesecharacteristics and adjust the prior likelihoods of different states tosuit the patient as herein described.

A discrete set of j observations for purposes of determining an observedprobability function L(F_(j)|H_(i)) may be defined for a flow signal.Similarly, a discrete set of observations of the derivative of flow maybe defined. The function may be predefined or changed as a result ofchanging patient respiratory characteristics. The function may bedefined by dividing the range of values for flow or derivative of flowinto discrete sub-ranges and then comparing those sub-ranges to eachstate and assessing probability based upon a typical or previouslyobserved respiratory flow curve's relationship with that sub-range. Forexample, the flow signal may range from −200 l/min to +200 l/min. Thismay be divided into the following sub-ranges: −200 to −50, −50 to 0, 0to 50, 50 to 200 l/min. Noise in the flow signal defines the smallestdivision into which flow signals may be divided (i.e., there is no pointin dividing the total range of flow signals into 1 l/min divisions ifthe noise level is 2 l/min). The following table, labeled ObservationTable 1, gives an example of the likelihoods of the observations beingmade, given the various hypotheses being true for a system thatdistinguishes six states. In this example, there is a low likelihoodthat a large positive flow signal will be observed during the midexpiration phase.

OBSERVATION TABLE 1 Early Mid Late Early Mid Late Inspira- Inspira-Inspira- Expira- Expira- Expira- L(F|H) tion tion tion tion tion tion200 to 100 low high low low low low (Large positive) 50 to 100 mediummedium medium low low low (Medium positive) 0 to 50 high low high mediumlow medium (Small positive) −50 to 0 medium low medium high low high(Small negative) −100 to −50 low low low medium medium medium (Mediumnegative −200 to −100 low low low low high low (Large negative)

While Observation Table 1 includes the terms “low”, “medium” and “high”to describe the likelihoods or probabilities, in actual calculationsthese terms will be quantified in the ranges of 0-33 percent for low,33-66 percent for medium and 66-100 percent for high. Moreover, theseprobabilities need not be limited to three levels. Generally, a changein the boundaries of the states leads to a change in the likelihood ofeach observation given the hypothesis that the patient is in a givenrespiratory state is true. Alternatively, the probabilities may bedetermined from defined continuous likelihood density functions.

FIG. 5 shows sample breath data that is subdivided into 9 states (shownwith Roman numerals). Note that states “i”, “ii” and “v” are relativelybrief compared to states “iii” and “vi”. Hence, everything else beingequal, states “iii” and “vi” have relatively greater prior likelihoodsthan states “i”, “ii” and “v”. The figure also depicts a set of flowobservations (large positive to large negative) as the observationsrelate to the classification of phase states. The observed probabilitiesL(F_(j)|H_(i)) may be determined from this graph. For example, theintercept or observation of a flow in the range of 80-100 (largepositive) would suggest a high probability for state iii but low forstates i, v, vi, vii, viii, ix. States ii and iv may have low to mediumlikelihoods as these cases are at the boundary of the large positiveobservation.

In the following hypothetical example, a calculation of the phaseprobability or likelihood is demonstrated in accordance with theinvention utilizing the simplified six classification system of FIG. 3in determining L(Hi) and Observation Table 1 for determining L(Fj|Hi).The results are as follows:

Observed Fact F:

-   -   Measured flow from flow signal is 150    -   So F_(j)=F_(large) _(—) _(positive)

Likelihood of Hypotheses L(H_(i)):

-   -   L(H_(early) _(—) _(inspiration))=⅙=0.167    -   L(H_(mid) _(—) _(inspiration))=⅙=0.167    -   L(H_(late) _(—) _(inspiration))=⅙=0.167    -   L(H_(early) _(—) _(expiration))=⅙=0.167    -   L(H_(mid) _(—) _(expiration))=⅙=0.167    -   L(H_(late) _(—) _(expiration))=⅙=0.167

Likelihood of Observation Given Hypothesis L(H_(i)|F_(j))

-   -   L(F_(large) _(—) _(positive)|H_(early) _(—) _(inspiration))=0.25        (assuming 0.25=low)    -   L(F_(large) _(—) _(positive)|H_(mid) _(—) _(inspiration))=0.75        (assuming 0.75=high)    -   L(F_(large) _(—) _(positive)|H_(late) _(—) _(inspiration))=0.25    -   L(F_(large) _(—) _(positive)H_(early) _(—) _(expiration))=0.25    -   L(F_(large) _(—) _(positive)|H_(mid) _(—) _(expiration))=0.25    -   L(F_(large) _(—) _(positive) |H_(late) _(—) _(expiration))=0.25

Bayes' Theorem Calculations:

${L\left( H_{early\_ inspiration} \middle| F_{large\_ positive} \right)} = {\frac{0.25 \times 0.167}{\begin{matrix}{{0.25 \times 0.167} + {5 \times}} \\\left( {0.167 \times 0.25} \right)\end{matrix}} = 0.125}$${L\left( H_{{mid\_ inspiratio}n} \middle| F_{large\_ positive} \right)} = {\frac{0.75 \times 0.167}{\begin{matrix}{{0.25 \times 0.167} + {5 \times}} \\\left( {0.167 \times 0.25} \right)\end{matrix}} = 0.375}$${L\left( H_{late\_ inspiration} \middle| F_{large\_ positive} \right)} = {\frac{0.25 \times 0.167}{\begin{matrix}{{0.25 \times 0.167} + {5 \times}} \\\left( {0.167 \times 0.25} \right)\end{matrix}} = 0.125}$${L\left( H_{early\_ expiration} \middle| F_{large\_ positive} \right)} = {\frac{0.25 \times 0.167}{\begin{matrix}{{0.25 \times 0.167} + {5 \times}} \\\left( {0.167 \times 0.25} \right)\end{matrix}} = 0.125}$${L\left( H_{mid\_ expiration} \middle| F_{large\_ positive} \right)} = {\frac{0.25 \times 0.167}{\begin{matrix}{{0.25 \times 0.167} + {5 \times}} \\\left( {0.167 \times 0.25} \right)\end{matrix}} = 0.125}$${L\left( H_{late\_ expiration} \middle| F_{large\_ positive} \right)} = {\frac{0.25 \times 0.167}{\begin{matrix}{{0.25 \times 0.167} + {5 \times}} \\\left( {0.167 \times 0.25} \right)\end{matrix}} = 0.125}$By comparing the calculated probabilities L(H_(i)|F_(j)) to find themost probable phase, it is apparent that in this simplified example thephase is early inspiration. With this determination, a system providingventilatory support may automatically adjust the support to accommodatethe patient's phase, for example, by adjusting a pressure gainassociated with the particular state of the determined phase. Moreover,the probability for the phase L(H_(i)) may be modified aftercalculations to improve subsequent determinations by adjusting L(H_(i))to equal or approach the determined phase likelihoods L(H_(i)|F_(j)) bya function of L(H_(i)|F_(j)). Moreover, the likelihoods of each of theobservations L(F_(j)|H_(i)) may be updated based upon recorded breathdata representing a prior respiratory cycle or some average of the priorrespiratory cycles.

In accordance with the invention, a processor of a ventilator apparatuslike that illustrated in FIG. 1 is programmed with an algorithm thataccomplishes the following preferred method:

I. Repeat the following with a first time constant:

(a) Update the prior likelihood for each state L(H₁)

(b) Update the likelihood of each observation, given each stateL(F_(j)|H_(i))

II. Repeat the following with a second time constant:

(a) Measure flow, determine rate of change of flow

(b) Calculate the likelihood L(H_(i)|F_(j)) for each state using Bayes'theorem.

(c) Phase is determined to be the most likely state.

The first time constant may be in the order of several typical breaths,for example 10 to 15 s. The second time constant is shorter, forexample, 1/20th of the duration of a typical breath, or several hundredmilliseconds.

In one form, the apparatus according to the invention provides atraining period when the patient is allowed to wear the mask in arelaxed environment. The flow and pressure in the mask are monitored andthe device has the opportunity to learn some of the characteristics ofthe patient's respiratory patterns. During this period adjustments tothe functions for likelihoods P(H_(i)) and P(F_(j)|H_(i)) for each stateof the system can be made using L(H_(i)|F_(j)) and observed breath dataand/or the partitioning of phase states may change. The respiratorycharacteristics of the patient will change when the patient fallsasleep, however, the apparatus can monitor the transition to the sleepstate and estimate probable parameters for the sleep state.

While patient respiratory flow can be modeled as being generallysinusoidal, in reality, the data are more complicated. For example,FIGS. 6 and 7 show flow data from a person over periods of 1 minute and10 seconds respectively. The data can be additionally complicated withthe presence of noise, artefact, drift, sighs, coughs and other events.During the presence of flows of small absolute value, the effect ofheart beat (the so-called “cardiogenic effect”) on flow data can beidentified. These complications, which may be termed “non-idealities”,mean that a simple automatic system may incorrectly decide phase.

For example, with reference to FIG. 7, a system based purely onthreshold values might conclude that the patient had moved to theinspiratory phase at approximately 2 seconds, and then a short whilelater, for example a hundred milliseconds, gone to the expiratory phase,and then switched back to the inspiratory phase once again. In asimplified automatic system, such a breath may complicate calculationsof the length of a respiratory cycle and the volume of air inhaled orexhaled. Hence there is a need for a method and apparatus which canaccurately determine the phase of a respiratory cycle of a patient fromcomplex flow data. There is a need for a method and apparatus which isless likely to be confused by non-ideal flow when determining the phaseof the patient.

One approach to solving the problem of dealing with non-idealities inflow data is to smooth the data, for example by low-pass filtering thedata in the measuring step 22. A low pass filter may be characterized bythe time constant of the filter. A small time constant may mean that theamount of smoothing is small, but the system can respond more quickly. Alarger time constant may mean that the data is smoother, but that thesystem does not respond as quickly. A very large timeconstant—essentially a long term average—may remove all phaseinformation. Hence there is a need to choose an appropriate timeconstant if the data are to be smoothed. Furthermore, there may be anadvantage in a system that learns from the flow data of the patient whatan appropriate time constant may be. Such a system can dynamicallyupdate the time constant if necessary.

Determining the derivative of noisy data can be particularlyproblematic. An algorithm for calculating a derivative may give verydifferent results depending on the period over which the data isanalyzed. For example with reference to FIG. 7, an algorithm whichcalculated the derivative of data over the region from 2 seconds to 2.1seconds may give a negative value, while an algorithm which calculatedthe derivative over the region from 2 seconds to 2.5 seconds may give anear zero value. A turning point is a part of a curve where the slope ofthe curve changes between positive and negative, that is, the secondderivative is zero. Similarly, the data at the end of a respiratorycycle (that is, after exhalation and before inhalation) can beparticularly non-ideal because of the presence of cardiogenic flow. As aresult, the calculations for determining the derivative of flow at theend of a respiratory cycle can be problematic and error prone.

To overcome this problem, an algorithm for determining phase inaccordance with the invention may first determine whether the patient islikely to be near the end of a respiratory cycle (for example, if theabsolute value of a flow datum is, small, hence distinguishing from peakinspiration and peak exhalation). If the patient is likely to be nearthe end of a respiratory cycle, then a different time constant may beapplied to the smoothing of data for the purposes of calculating aderivative. In a preferred embodiment, the time constant will be longerin the region near the end of the respiratory flow curve than at otherregions, such as early to late inspiration and early to late expiration.Furthermore, in an algorithm in accordance with the invention, theeffect of the derivative in determining the phase of the patient'srespiratory cycle is given less weight in the region where derivativecalculations are likely to be error prone, such as one or more of thefollowing: the end of the respiratory cycle, peak inspiration, and peakexpiration. Furthermore, in an algorithm in accordance with anembodiment of the invention, an a priori likelihood function for thederivative of flow in the end of the respiratory cycle has a maximum ata low or zero value of flow and a minimum at large values of thederivative. In other words, in an algorithm in accordance with anembodiment of the invention, in this region, a low value of thederivative has a higher likelihood than a high value of the derivative.

In a preferred embodiment of the invention, 12 bit flow data arecollected at 50 Hz. The data are low pass filtered with a time constantof 160 ms.

As previously described, in a system in which phase is divided intoseveral states, an algorithm in accordance with an embodiment of theinvention may determine that the patient is in one of those states, forexample the state with the largest likelihood or probability.Alternatively the algorithm may determine that phase is part way betweentwo adjacent states with high likelihoods. The algorithm may determinethat the phase is closer to the one of the two states with the highestlikelihood, for example, by weighting in accordance with the relativesize of the likelihoods. Hence if one state is 95% likely and another is70% likely, the phase will be determined to be closer to the state whichis 95% likely. In this regard, phase may be determined as a continuousvariable. For example, phase may vary from 0 to 1 depending on the statedetermined or depending on the proximity between two most likely states.Alternatively or additionally, phase may be represented using polarcoordinates and vary from 0 to 360 degrees, or 0 to 2 pi radians.

To illustrate such a determination, phase may be calculated as acontinuous variable φ. One way to estimate this from a series ofposterior probabilities P_(i) of N states S_(i) is to associate eachstate with a standard phase φ_(s,i) and weighting factor W_(i) thencalculate φ as

$\phi = {\sum\limits_{i = 1}^{N}\;{P_{i}W_{i}\phi_{s,i}}}$Another approach is to use the formulation of Bayes theorem in terms ofcontinuous random variables, which yields the following posteriordensity function (assuming here that the information available about thepatient is the instantaneous respiratory flow q),P_(Φ|Q)(φ,q)and the estimate of φ is that value which maximizes the posteriordensity given the observed value q of patient flow (this may be a localor global maximum). In practice, the prior and conditional densitieswhich are used to calculate the posterior density may be estimated fromdiscrete data, possibly by using continuous interpolating functions suchas piecewise linear or cubic spline functions. The posterior densityfunction may then be calculated (possibly piecewise) analytically or vianumerical methods, yielding a posterior density function which may thusbe a continuous function of φ and q. If the posterior density is acontinuous function, it follows that since flow q is a continuousfunction of time then the estimated phase φ is a continuous function oftime.

Such a continuous phase variable may then be used to adjust ventilatorsupport pressure. For example, if the pressure delivered to the patientis based on a continuous function Π of phase,P=P _(min) +AΠ(φ)where P_(min) and A are constants or slowly varying quantities, then animportant consequence of the phase being a continuous function of timeis that the pressure is a continuous function of time, which may bedesirable for example in order to avoid the discomfort which may beassociated with sudden changes in pressure delivered to the airway.

Of course, as the number of discrete states increases, therepresentation of phase may be regarded as a continuous, rather thandiscrete function. This may alleviate a need for the additionalcalculation of a continuous phase variable from the determined phasestates. In this regard, although six and nine states have beenidentified in prior embodiments, by way of example, phase may be dividedinto as many as 128 or 256 states.

In an algorithm in accordance with an embodiment of the invention, phasedeterminations may be enhanced by other phase related likelihoods. Forexample, consecutive phase states are more likely than non-consecutivephases. Thus, a phase determination may be based in part upon thelikelihood that the current state is the next consecutive state from apreviously determined state. To illustrate such a process, suppose thatit has been determined that the current phase state is earlyinspiration. If the next phase state is mid-inspiration, thenmid-inspiration is a priori more likely than a non-consecutive state,such as late inspiration or an expiratory state. Hence as phaseprogresses through the cycle, a priori likelihoods are adjusted inaccordance with their consecutive status, for example by increasing thecalculated probability of the next consecutive state. This is not to saythat an algorithm in accordance with an embodiment of the inventioncannot make a determination that a non-consecutive state will follow thecurrent state, but simply that it is less likely to make such adetermination. Hence in an algorithm in accordance with an embodiment ofthe invention, phase “cycling”—where the algorithm flips back andforward between two states—is less likely.

Although the invention has been described with reference to particularembodiments, it is to be understood that these embodiments are merelyillustrative of the application of the principles of the invention.Thus, it is to be understood that numerous modifications may be made inthe illustrative embodiments of the invention and other arrangements maybe devised without departing from the spirit and scope of the invention.

1. An apparatus for delivering ventilatory support to a subject synchronized to the subject's respiratory phase, comprising: a means for providing a controlled supply of breathable gas to a subject's airway; a means for generating an air flow signal representative of the subject's respiration; and a processor to determine a phase of the subject's respiratory cycle and to control the supply of breathable gas delivered to the subject's airway; wherein said processor determines a phase in the subject's respiratory cycle by (a) designating a plurality of phase states within said subject's respiratory cycle, each phase including one or more phase states; (b) calculating a measure of the subject's respiration from said air flow signal; (c) determining probabilities for said subject being in each of said phase states based on said measure of respiration; and (d) identifying a phase in the subject's respiratory cycle from the determined probabilities of said subject's respiratory cycle being in each of said phase states; and said processor causes the delivery of a supply of breathable gas synchronized with the determined phase of the subject's respiratory cycle.
 2. The apparatus of claim 1 wherein said means for providing a controlled supply of breathable gas includes a ventilator and said means for generating an air flow signal representative of the subject's respiration includes a transducer.
 3. The apparatus of claim 1 wherein said probabilities are determined based on the ratio of each phase state's duration to the duration of an entire respiratory cycle.
 4. The apparatus of claim 1 wherein said probabilities are determined based on the ratio of each phase state's duration to the duration of an entire respiratory cycle and also as a function of previously determined probabilities.
 5. The apparatus of claim 1 wherein said probabilities are determined using a comparing function that relates said plurality of phase states to sub-ranges selected from a range of measures of a respiratory cycle.
 6. The apparatus of claim 1 wherein said comparing function changes as a result of changing respiratory cycles of the subject.
 7. The apparatus of claim 1 wherein said processor identifies a phase by additionally comparing determined probabilities to identify a determined probability that is more probable than other determined probabilities.
 8. The apparatus of claim 1 wherein said designating a plurality of phase states involves partitioning a respiration cycle in relation to a peak flow.
 9. The apparatus of claim 1 wherein said designating a plurality of phase states is repeated to adjust said phase states to account for the subject's changing respiratory characteristics as assessed by a measure of respiration over time.
 10. The apparatus of claim 9 wherein said calculating a measure of the subject's respiration includes smoothing data and performing a low pass filtering operation on said data from said air flow signal.
 11. The apparatus of claim 1 wherein said determining probabilities involves an evaluation of prior probabilities and observed probabilities as a function of Bayes' theorem.
 12. The apparatus of claim 1 wherein said determining probabilities includes adjusting a probability based upon state succession.
 13. The apparatus of claim 1 wherein said designating a phase involves calculating a continuous phase variable from said probabilities.
 14. A method for delivering ventilatory support to a subject at a pressure synchronized with the subject's respiratory phase using a processor, comprising the steps of: generating, using the processor, an air flow signal representing said subject's air flow; calculating, using the processor, a measure of the subject's respiration from said air flow signal; designating, using the processor, a plurality of phase states within the subject's respiratory cycle, wherein each phase is comprised of one or more phase states; determining, using the processor, probabilities for said subject's respiratory cycle being in each of said phase states based on the measure of the subject's respiration; identifying, using the processor, a phase in the subject's respiratory cycle from the calculated probabilities of said phase states; and delivering a supply of breathable gas using a ventilator at a pressure synchronized with the determined phase of the subject's respiratory cycle.
 15. The method of claim 14 wherein said air flow signal is generated using a transducer.
 16. The method of claim 14 wherein said probabilities are determined based on the ratio of each phase state's duration to the duration of an entire respiratory cycle.
 17. The method of claim 14 wherein said probabilities are determined based on the ratio of each phase state's duration to the duration of an entire respiratory cycle and also as a function of previously calculated probabilities.
 18. The method of claim 14 wherein said probabilities are determined using a comparing function that relates said plurality of phase states to sub-ranges selected from a range of measures of a respiratory cycle.
 19. The apparatus of claim 18 wherein said comparing function changes as a result of changing respiratory cycles of the subject.
 20. The method of claim 14 wherein a phase is identified by additionally comparing determined probabilities for one that is more probable than other determined probabilities.
 21. The method of claim 14 wherein said designating a plurality of phase states involves partitioning a respiration cycle in relation to a peak flow.
 22. The method of claim 14 wherein said designating a plurality of phase states is repeated to adjust said phase states to account for the subject's changing respiratory characteristics as assessed by a measure of respiration over time.
 23. The apparatus of claim 22 wherein calculating a measure of the subject's respiration includes smoothing data and performing a low pass filtering operation on said data from said respiration.
 24. The method of claim 14 wherein said determining probabilities involves an evaluation of prior probabilities and observed probabilities as a function of Bayes' theorem.
 25. The method of claim 14 wherein said determining probabilities includes adjusting a probability based upon state succession.
 26. The method of claim 14 wherein said identifying a phase involves calculating a continuous phase variable from said determined probabilities. 